const path = require("path");
const HtmlWebpackPlugin = require("html-webpack-plugin");

module.exports = {
  mode: "development",
  devServer: {
    static: "./dist",
    port: 3300,
  },
  entry: "./src/app.js",
  output: {
    path: path.resolve(__dirname, "dist"),
    clean: true,
  },
  plugins: [
    new HtmlWebpackPlugin({
      title: "手写MVVM框架",
      template: "./index.html",
    }),
  ],
};
